package ch01;

public class SleepTest {

	public static void main(String[] args) {
		String[] params = {"one","two","three","four"};
		long start = System.nanoTime();
		for (int i = 0; i < params.length; i++) {
			try{
				System.out.println(params[i]);
				// 休眠主线程
				Thread.sleep(1000);
			}catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
		long end = System.nanoTime();
		System.out.println("总的时间:"+ ( end - start)/(1000 * 1000));
	}
}
